.dialog-body {
  display: flex;
  flex-direction: row;
  background-color: var(--ls-white1);
  font-size: 14px;
  height: calc(100% - 46px);

  :global {
    .dialog-sidebar {
      width: 185px;
      border-right: 1px solid var(--ls-border_bg2);
      background-color: var(--ls-module_bg2);
      padding: 20px 20px 20px 0;
    }

    .content-section {
      height: 100%;
    }

    .sidebar-item {
      padding: 9px 18px 9px 40px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      border-radius: 6px;
      position: relative;

      &:hover {
        background-color: var(--cs-component_hover_bg);
      }

      &.active {
        background-color: var(--ls-component_hover_bg);
        color: var(--ls-color_primary);
        border-radius: 8px;

        &:hover {
          color: var(--ls-primary_hover);
        }

        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 3px;
          height: 100%;
          background-color: var(--ls-color_primary);
          border-radius: 0 2px 2px 0;
        }
      }
    }
    .text-placeholder {
      padding-top: 100px;
    }
    .dialog-content {
      width: calc(100% - 185px);
      padding: 20px 24px 24px 25px;
    }

    .section-title {
      color: var(--ls-color_primary);
      margin-bottom: 24px;
      font-weight: 500;
    }

    .el-form-item {
      margin-bottom: 25px;
    }

    .el-form-item__label {
      color: var(--ls-gray3);
      font-size: 14px;
    }

    .form-value-item {
      color: var(--ls-gray1);
      font-size: 14px;
    }

    .el-row {
      width: 500px;
    }

    .permission-tabs-container {
      position: relative;
      flex: 1;
      display: flex;
      flex-direction: column;
      height: calc(100% - 46px);
    }

    .permission-type-selector {
      display: flex;
      width: 212px;
      height: 36px;
      border-radius: 4px;
      padding-left: 4px;
      justify-content: flex-start;
      align-items: center;
      flex-shrink: 0;

      .permission-type-item {
        position: relative;
        border: none;
        padding: 3px 16px;
        height: 32px;
        line-height: 32px;
        border-radius: 6px;
        margin: 0 2px 0 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        font-weight: 400;
        font-size: 14px;
        flex: 0 0 auto;
        min-width: auto;
        box-sizing: border-box;
        cursor: pointer;

        &:last-child {
          margin-right: 0;
        }

        &:hover {
          color: var(--ls-color_primary);
        }

        &.active {
          color: var(--ls-gray1);
          padding: 0 16px;
          margin: 0 2px 0 0;

          &::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            height: 4px;
            background: var(--ls-color_primary);
            border-radius: 2px;
          }

          &:last-child {
            margin-right: 0;
          }

          .permission-label {
            color: var(--ls-color_primary);
          }
        }
      }
    }

    .permission-content {
      margin-top: 16px;
      width: 100%;
      border-radius: 6px;
      box-sizing: border-box;
      border: 1px solid var(--ls-border_bg2);
      flex: 1;
      height: calc(100% - 52px);
    }

    .mi-tree-selector {
      height: 100%;
    }

    .mi-tree-selector__tree {
      height: calc(100% - 108px);
    }

    .permission-Inheritance-content {
      margin-top: 16px;
      padding: 12px 400px 0 16px;
      width: 100%;
      border-radius: 6px;
      box-sizing: border-box;
      border: 1px solid var(--ls-border_bg2);
      overflow-x: hidden;
      overflow-y: auto;
      flex: 1;

      .el-empty {
        --el-empty-padding: 20px;
      }
    }

    .transfer-save {
      width: 60px;
      height: 32px;
      border-radius: 4px;
      border: none;
      position: absolute;
      top: 0;
      right: 0;
      z-index: 20;
    }

    .permission-tabs {
      height: 100%;
    }

    .permission-tabs {
      .el-tabs__header {
        margin: 0;
        border: none;
        height: 40px;
        margin-bottom: 16px;
        flex-shrink: 0;
      }

      .el-tabs__nav-wrap {
        height: 100%;
        padding-bottom: 0;

        &::after {
          display: none;
        }
      }

      .el-tabs__nav-scroll {
        height: 100%;
        overflow: hidden;
      }

      .el-tabs__nav {
        border: none;
        display: flex;
        align-items: center;
        height: 100%;
        padding: 2px;
        gap: 0;
        transform: none;
        border-radius: 8px;
      }

      .el-tabs__item {
        display: flex;
        border: none;
        flex-direction: column;
        align-items: center;
        padding: 10px 12px;
        cursor: pointer;
        border-bottom: 3px solid transparent;
        border-bottom-left-radius: 1.5px;
        border-bottom-right-radius: 1.5px;

        &.is-active {
          position: relative;
          color: var(--ls-color_primary);
          font-weight: 500;
        }

        &.is-active::after {
          content: '';
          position: absolute;
          bottom: -5px;
          left: 50%;
          transform: translateX(-50%);
          width: 100%;
          height: 4px;
          background: var(--ls-color_primary);
          border-radius: 2px;
        }
      }

      .el-tabs__active-bar {
        display: none;
      }

      .el-tab-pane {
        height: 100%;
        display: flex;
        flex-direction: column;
      }
    }
  }
}

:global {
  .role-info-dialog {
    width: 1184px;
    height: 680px;
    overflow: hidden;

    .el-dialog__body {
      padding: 0 0 0 1px;
      height: 100%;
    }

    .el-dialog__footer {
      display: none;
    }

    .dialog-content {
      height: 100%;
    }
  }

  @include screen-below-1600 {
    .role-info-dialog {
      width: 840px;
      aspect-ratio: 1.74 / 1;
    }
  }

  @include screen-1600-to-1920 {
    .role-info-dialog {
      width: 992px;
      aspect-ratio: 1.74 / 1;
    }
  }
}
